package com.ruoyi.pims.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pims.mapper.RyStockDistributionMapper;
import com.ruoyi.pims.domain.RyStockDistribution;
import com.ruoyi.pims.service.IRyStockDistributionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存分布Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-18
 */
@Service
public class RyStockDistributionServiceImpl implements IRyStockDistributionService 
{
    @Autowired
    private RyStockDistributionMapper ryStockDistributionMapper;

    /**
     * 查询库存分布
     * 
     * @param distributionId 库存分布主键
     * @return 库存分布
     */
    @Override
    public RyStockDistribution selectRyStockDistributionByDistributionId(Long distributionId)
    {
        return ryStockDistributionMapper.selectRyStockDistributionByDistributionId(distributionId);
    }

    /**
     * 查询库存分布列表
     * 
     * @param ryStockDistribution 库存分布
     * @return 库存分布
     */
    @Override
    public List<RyStockDistribution> selectRyStockDistributionList(RyStockDistribution ryStockDistribution)
    {
        return ryStockDistributionMapper.selectRyStockDistributionList(ryStockDistribution);
    }

    /**
     * 新增库存分布
     * 
     * @param ryStockDistribution 库存分布
     * @return 结果
     */
    @Override
    public int insertRyStockDistribution(RyStockDistribution ryStockDistribution)
    {
        return ryStockDistributionMapper.insertRyStockDistribution(ryStockDistribution);
    }

    /**
     * 修改库存分布
     * 
     * @param ryStockDistribution 库存分布
     * @return 结果
     */
    @Override
    public int updateRyStockDistribution(RyStockDistribution ryStockDistribution)
    {
        return ryStockDistributionMapper.updateRyStockDistribution(ryStockDistribution);
    }

    /**
     * 批量删除库存分布
     * 
     * @param distributionIds 需要删除的库存分布主键
     * @return 结果
     */
    @Override
    public int deleteRyStockDistributionByDistributionIds(String distributionIds)
    {
        return ryStockDistributionMapper.deleteRyStockDistributionByDistributionIds(Convert.toStrArray(distributionIds));
    }

    /**
     * 删除库存分布信息
     * 
     * @param distributionId 库存分布主键
     * @return 结果
     */
    @Override
    public int deleteRyStockDistributionByDistributionId(Long distributionId)
    {
        return ryStockDistributionMapper.deleteRyStockDistributionByDistributionId(distributionId);
    }
}
